package finishi;

class ParkingSystem {
    int bigNum;
    int mediumNum;
    int smallNum;

    public ParkingSystem(int big, int medium, int small) {
        this.bigNum = big;
        this.mediumNum = medium;
        this.smallNum = small;
    }
    
    public boolean addCar(int carType) {
        switch (carType) {
            case 1:
                bigNum--;
                if (bigNum < 0) {
                    return false;
                }
                break;    
            case 2:
                mediumNum--;
                if (mediumNum < 0) {
                    return false;
                }
                break;  
            case 3:
                smallNum--;
                if (smallNum < 0) {
                    return false;
                }
                break; 
            default:
                break;                     
        }
        return  false;
    }
}

